import { post } from '@/utils/request';

interface Translate {
  text: string
  to: string
  from: string
}
interface TranslateRes {
  tgt_text: string
  to: string
  from: string
}
export const translateText = (text: string, to?: string, from?: string) => {
  return post<TranslateRes>('/admin/tools/translate', {text, to, from});
};